home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.lang.c,alt.msdos.programmer
- Path: netcom.com!xanthas
- From: xanthas@netcom.com (Mike Day)
- Subject: Error with Watcom's Graphics Routines
- Message-ID: <xanthasDLLDBp.LK7@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- X-Newsreader: TIN [version 1.2 PL1]
- Date: Mon, 22 Jan 1996 16:47:48 GMT
- Sender: xanthas@netcom19.netcom.com
-
-
- [ note: this message is crossposted (because it relates to each) to the
- following newsgroups:
- comp.lang.c
- comp.lang.c++
- alt.msdos.programmer ]
-
- Hello...
-
- I believe I have found an error in Watcom's Graphics Routines,
- specifically, the ones used to detect the video configuration and cursor
- position.
-
- I have the following code I call a few times throught my program to
- detect these things:
-
- // Get dimensions of screen
- videoconfig vc;
- _getvideoconfig(&vc);
- oldrows = rows = vc.numtextrows;
- oldcols = cols = vc.numtextcols;
-
- // Save the screen and position/color
- oldcolor = _gettextcolor();
- oldbkcolor = _getbkcolor();
- screensaved = (rows * cols) << 1;
- if (screensave) free(screensave);
- screensave = (char *) malloc(screensaved);
- if (screensave) memcpy(screensave,(void *)0x000b8000,screensaved);
- oldpos = _gettextposition();
-
- I used printf and a delay to see what this code got me each time I ran it,
- and it always gives me the same values for rows, cols, and oldpos as when
- I call it at the beginning of the program, even after changing text modes.
- (80x50, 80x25, etc.) It seems that watcom only detects this information at
- the beginning of a program and nowhere thereafter, even when you call its
- functions. I am changing the text mode with bios calls, not calls to the
- watcom graphics library, so perhaps that is a problem...
-
- If you have experienced this problem, have suggestions or a solution,
- please email me at the address in my .sig.
-
- Thanks.
- --
- Mike Day (Omni-)
- xanthas@netcom.com
-
-